# 菜单
def display_menu():
    print('-' * 30)
    print('   名片管系统    v8.8')
    print('1.  添加名片')
    print('2.  删除名片')
    print('3.  修改名片')
    print('4.  查询名片')
    print('5.  获取所有名片信息')
    print('6.  推出系统')
    print('-' * 30)

name_list = []
i = 0
while i < 1:
    display_menu()

    # 获取用户输入信息
    def get_choice():


        selected_key = input('请输入选择的序号：')
        return int(selected_key)

    # 等待用户选择
    key = get_choice()


    # 通过获取序号、执行不同的功能
    # 1. 添加名片
    def add_info():
        new_name = input('请输入名字：')
        name_list.append(new_name)
    # 5. 获取所有名片信息
    def print_all_info(temp_list):
        print('='*30)
        for info in temp_list:
            print(info)
        print('=' * 30)

    if key == 1:
        add_info()
    elif key == 2:
        pass
    elif key == 3:
        pass
    elif key == 4:
        pass
    elif key == 5:
        print_all_info(name_list)
    elif key == 6:
        pass
    else:
        print('输入内容有误，请重新输入...')
